project ( kleber )

cmake_minimum_required( VERSION 2.4.8 )
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")

find_package(Qt4 REQUIRED)
  set( QT_USE_QTXML      ON )
  set( QT_USE_QTNETWORK  ON )
  set( QT_USE_QTTEST     ON )
  set( QT_USE_QTSCRIPT   ON )
  include( ${QT_USE_FILE} )

#FIND_PACKAGE(LIBPODOFO REQUIRED)

add_subdirectory( zebra )

set( PODOFO_BUILD_STATIC )
add_subdirectory( podofo )

include_directories( ${CMAKE_SOURCE_DIR}
                     ${CMAKE_SOURCE_DIR}/zebra
                     ${CMAKE_BINARY_DIR}
                     ${QT4_INCLUDES}
                     #${LIBPODOFO_H}
                     ${CMAKE_SOURCE_DIR}/podofo
                     )

set( kleber_SRCS KleberDocument.cpp
                 KleberPage.cpp
                 #KleberPageDisplay.cpp
                 main.cpp
                 )
set( kleber_MOC_h KleberPage.h KleberDocument.h )

QT4_WRAP_CPP( kleber_MOC_SRCS ${kleber_MOC_h} )

QT4_CREATE_TRANSLATION( kleber_QMS ${kleber_SRCS} translations/kleber_de.ts )

add_executable ( kleber ${kleber_SRCS} ${kleber_MOC_SRCS} ${kleber_QMS})

target_link_libraries ( kleber 
      zebra
      ${QT_QTCORE_LIBRARY} 
      ${QT_QTGUI_LIBRARY} 
      ${QT_QTSCRIPT_LIBRARY} 
      ${QT_QTMAIN_LIBRARY}
      #${LIBPODOFO_LIB}
      podofo_static
      )

